package com.xing.service.impl;

import com.xing.config.RedisUtils;
import com.xing.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

/**
 * @version 1.0
 * @Author Xing
 * @Date 2024/1/20 20:44
 */
@Service
public class RedisServiceImpl implements RedisService {
    @Autowired
    private RedisUtils utils;

    @Override
    public void addRedis(String key) {
        utils.set("aa",key,5, TimeUnit.MINUTES);
    }
}
